package org.donald.hessian.client;

import java.net.MalformedURLException;

import org.donald.hessian.service.HelloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.fasterxml.jackson.core.util.DefaultIndenter;


/**
 * @author donald
 * 2018年3月12日
 * 下午5:08:43
 */
public class SpringClient {
	private static final Logger log = LoggerFactory.getLogger(SpringClient.class);
	@SuppressWarnings("resource")
	public static void main(String[] args) throws MalformedURLException {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"classpath:applicationContext.xml"});
		HelloService helloService = (HelloService)context.getBean("helloService");
		String result = helloService.sayHello("donald");
		log.info("result:{}",result);
	}
}
